package com.heima.article.controller.v1;

import com.heima.article.service.ApArticleCollectionService;
import com.heima.model.article.dto.ArticleDto;
import com.heima.model.article.dto.CollectionBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author TheCai
 * @date 2021/6/5 14:51
 **/
@Api(value = "App文章收藏功能",tags = "App文章收藏功能")
@RestController
@RequestMapping("/api/v1/collection_behavior")
public class ApArticleCollectionController {

    @Autowired
    ApArticleCollectionService apArticleCollectionService;

    @ApiOperation(value = "App文章收藏功能",notes = "App文章收藏功能")
    @PostMapping()
    public ResponseResult saveArticle(@RequestBody CollectionBehaviorDto dto) {
        return apArticleCollectionService.ApArticleCollection(dto);
    }
}
